package com.changwu.cwbase.temples.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.changwu.cwbase.temples.fragment.TempleFragment;


/**
 * 我的账户
 */

public class TempTabLayoutAdapter extends FragmentPagerAdapter {

    private String[] TITLES = null;

    public TempTabLayoutAdapter(FragmentManager fm) {
        super(fm);
        TITLES = new String[]{"Fragment嵌套", "模板"};
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return TITLES[position];
    }

    @Override
    public int getCount() {
        return TITLES.length;
    }

    @Override
    public Fragment getItem(int position) {
        Fragment temp = null;
//		LogUtil.log("", position+"*****"+TITLES[position]);
        switch (position) {
            case 0:
                temp = TempleFragment.newInstance();
                break;
            case 1:
                temp = TempleFragment.newInstance();
                break;
        }
        return temp;
    }

}